package com.sparrow.common.aoi;

import com.sparrow.common.aoi.impl.crosslinked.CrossLinkedAOISystem;

import javax.swing.*;

public class AoiTestMain extends JFrame {
    public AoiTestMain() {
        setTitle("AOI 系统测试");
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        AoiPanel panel = new AoiPanel(800, 800, new CrossLinkedAOISystem());
        JScrollPane scrollPane = new JScrollPane(panel);
        panel.setScrollPane(scrollPane); // 给 panel 传递引用

        add(scrollPane);

        pack();
        setLocationRelativeTo(null);
        setVisible(true);
    }

    public static void main(String[] args) {
        new AoiTestMain();
    }
}

